#pragma once

// Copyright (c) 2010 Manuel Peinado Gallego <manuel.peinado@gmail.com>
// Distributed under the MIT license

#include "Geometry.h"


BEGIN_ENUM(GeometryType)
    Unknown = -1, Primitive, Mesh, 
END_ENUM(GeometryType)


class GeometryFactory
{
public:
    
    static void write(std::wostream & os, const Geometry& shape);
    static ref<Geometry> read(std::wistream & is);

    // ************************************************************************

    static ref<Geometry> geometryFromName(const std::string& name);
    static std::string nameFromGeometry(const Geometry& shape);

    // ************************************************************************

    static GeometryType geometryToType(const Geometry& shape);
    static ref<Geometry> geometryFromType(GeometryType type);

    // ************************************************************************

    static GeometryType nameToType(const std::string& name);
    static std::string typeToName(GeometryType type);

private:

    GeometryFactory();

};
